package com.zy.web.demo.duoxiancheng.demo22;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/8/21 15:25
 */
public class ThreadB22 extends Thread{

    private ShengChan shengChan;

    public ThreadB22(ShengChan shengChan){
        this.shengChan = shengChan;
    }

    @Override
    public void run() {
        while (true){
            try {
                super.run();
                Thread.sleep(3000);
                shengChan.del();
            }catch (InterruptedException e){
                e.printStackTrace();
            }
        }
    }
}
